#ifndef __PID_H
#define __PID_H

typedef struct __Pid_Struct {
    float target;
    float curActual;
    float preActual;

    float error0;
    float error1;
    float errorInt;

    float preOut;
} Pid_StructDef;

typedef struct __PidSpeedInfo_Struct {
    float target;

    float curActualL;
    float curActualR;

    float preActualL;
    float preActualR;

    float error0;
    float error1;
    float errorInt;

    float preOut;

} PidSpeedInfo_StructDef;

// float pid_calSpeed(Pid_StructDef* pid_info);

float pid_calSpeed(PidSpeedInfo_StructDef* info);

float pid_calStand(float targetAngle, float roll, float gyroy);

float pid_calTurn(float targetTurn,float gyroz);


#endif
